<!-- 提现渠道 -->
<template>
	<div class="flex channel-withdraw">
		<div class="bg-e2e p-4 flex a-c">
      <!-- 提现至paypal -->
      <div 
        class="flex a-c j-c account-change br-2 plr-16 c-p"
        :class="{'bg-fff bold':channelType == 2}"
        @click="channelChange(2)"
        >
        <img class="change-icon" src="@/assets/images/user/account-paypal.png" alt="">
        <div class="f-14 lin-20 col-222 ml-4">
          {{ $t('setting.withdrawToPaypal') }}
        </div>
      </div>
      <!-- 提现至银行卡 -->
      <div 
        class="flex a-c j-c account-change br-2 plr-16 c-p ml-4"
        :class="{'bg-fff bold':channelType == 1}"
        @click="channelChange(1)"
        >
        <img class="change-icon" src="@/assets/images/user/account-card.png" alt="">
        <div class="f-14 lin-20 col-222 ml-4">
          {{ $t('setting.withdrawToCard') }}
        </div>
      </div>
    </div>
	</div>
</template>

<script>
	export default{
		data(){
			return{
				channelType:1,
			}
		},
		props:{
			accountType:{
        type:[Number,String],
        default:1
      }
		},
		computed:{
			
		},
		watch:{
			accountType:{
				handler(n){
					if(n){
            this.channelType = n;
          }
				},
				immediate:true
			}
		},
		methods:{
      //渠道切换
			channelChange(index){
        if(this.channelType != index){
          this.channelType = index;
          this.$emit('changeChannel',index)
        }
      }
		}
	}
</script>

<style lang="less" scoped>
	.channel-withdraw{
    .account-change{
      min-width: 144px;
      height: 48px;
      .change-icon{
        width: 24px;
        height: 24px;
      }
    }
  }
</style>